import java.util.LinkedList;
import java.util.List;

public class Test {
    public static void main(String[] args) {
        List<Integer> list = new LinkedList<>();
        list.add(1);
        list.add(2);
        list.add(3);
        list.add(4);
        list.add(5);

        for (int x : list) {
            System.out.print(x + " ");
        }

    }

    public static void main23(String[] args) {
        MyList myList = new MyList();
        myList.addLast(12);
        myList.addLast(23);
        myList.addLast(34);
        myList.addLast(45);
        myList.addLast(56);
        myList.addLast(56);
        myList.remove(56);
       // System.out.println(myList.last.val);
       // myList.addIndex(2,10);






        myList.display();
       /* System.out.println(myList.last.val);
        System.out.println(myList.size());
        System.out.println(myList.contains(12));*/

    }

    public static void main22(String[] args) {
        MyLinkedList myLinkedList = new MyLinkedList();
        //myLinkedList.creatList();
      //  System.out.println(" ==");
     /*   myLinkedList.addFirst(11);
        myLinkedList.addFirst(22);
        myLinkedList.addFirst(33);
        myLinkedList.addFirst(44);*/
        myLinkedList.addLast(11);
        myLinkedList.addLast(223);
        myLinkedList.addLast(224);
        MyLinkedList.ListNode ret =myLinkedList.middleNode();
        myLinkedList.display(ret);
       // myLinkedList.removeAllKey(225);
       /* myLinkedList.addLast(22);
        myLinkedList.addLast(33);
        myLinkedList.addLast(44);
        myLinkedList.addLast(55);*/


        //myLinkedList.addLast(11);


        /*myLinkedList.addLast(22);
        myLinkedList.addLast(33);

        myLinkedList.addLast(44);*/
      //  myLinkedList.addIndex(0,222);
       // myLinkedList.addIndex(1,222);
      /* myLinkedList.display();
       myLinkedList.reverseList();
       myLinkedList.display();*/

        //System.out.println(myLinkedList.size());

    }

}
